import React from "react";
import { Result, Button } from "antd";
import { handleBackToMain, useBackMain } from "@/utils/common";
// 引入自定义hooks方法
export default function NotFound(props) {
  const backMain = useBackMain();
  return (
    <div style={{ margin: " 100px 0 0 0px", textAlign: "center" }}>
      <Result
        status="404"
        title="404"
        subTitle="对不起，当前页面不存在！"
        extra={
          <Button
            type="primary"
            // onClick={() => {
            //   props.history.push(`/`);
            // }}
            onClick={backMain}
          >
            返回首页
          </Button>
        }
      />
    </div>
  );
}
